package com.qian.service.ddj.entity;

import com.yaowk.service.common.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import java.math.BigDecimal;
import java.util.Set;

@Entity
@Getter
@Setter
@ToString
@DynamicUpdate
@DynamicInsert
public class DdjBusinessCard extends BaseEntity<Integer> {

    private String cardNo;
    private String cardPerson;
    private String cardBank;
    private String cardPhone;
    @ColumnDefault("0")
    private BigDecimal balance;
    private String remark;

    @ManyToOne
    private DdjBusinessGroup businessGroup;

    @OneToMany
    private Set<DdjBusiness> businesses;

}
